<template>
    <header class="navbar">
        <div class="nav-wrap-left">
            <a class="back" href="#" onclick="javascript: window.history.back();return false;">
                <i class="icon-back"></i>
            </a>
        </div>
        <span class="nav-header">{{title}}</span>
        <div @click="shownav" class="nav-wrap-right">
            <div class="nav-button">
                <img src="//p0.meituan.net/scarlett/f05f61e7a8f3f45fd071c068d7a26870356.png" class="nav-icon" alt="">
            </div>
        </div>
        <div class="nav-list" v-if="ishow">
      <div class="nav-item">
        <a href="/">首页</a>
      </div>
       <div class="nav-item">
        <a href="/">首页</a>
      </div>
       <div class="nav-item">
        <a href="/">首页</a>
      </div>
       <div class="nav-item">
        <a href="/">首页</a>
      </div>
    </div>
    </header>
</template>

<style scoped>
.navbar {
    height: 50.5px;
    color: #fff;
    background: #ff5f16;
    border-bottom: 1px solid #ff5f16;
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-box;
    position: relative;
    font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
}
.navbar .nav-wrap-left, .navbar .nav-wrap-right {
    height: 50.5px;
    line-height: 50.5px;
}
.navbar .h1.nav-header, .navbar span.nav-header {
    display: block;
    -webkit-box-flex: 1;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    line-height: 50px;
    margin: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.navbar .nav-wrap-right {
    width: 52.5px;
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: end;
    justify-content: flex-end;
}
.navbar .nav-wrap-left, .navbar .nav-wrap-right {
    height: 50.5px;
    line-height: 50.5px;
}
.nav-wrap-left a.back {
    height: 50px;
    width: 22.5px;
    line-height: 50px;
    padding: 0 15px;
}
.icon-back {
    display: inline-block;
    width: 22.5px;
    height: 22.5px;
    vertical-align: middle;
    position: relative;
    font-style: italic;
}
.icon-back:before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    width: 16px;
    height: 16px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    -webkit-transform: rotate(
45deg
);
    transform: rotate(
45deg
);
}
.navbar .nav-wrap-right img {
    width: 17px;
    height: 16px;
    margin-right: 12px;
    display: block;
    border: 0;
}

.nav-list {
    position: absolute;
    top: 46px;
    right: 12px;
    width: 110px;
    background-color: #fff;
    z-index: 20;
    box-shadow: 0 3px 9px 0 rgb(0 0 0 / 10%);
}
.nav-list .nav-item {
    height: 45.5px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}
.nav-list .nav-item a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    line-height: 45.5px;
}
</style>
<script>
// import http from '@/Util/http'
export default {
  props: {
    title: {
      type: String,
      default: '泽枫电影'

    }
  },
  data () {
    return {
      ishow: false
    }
  },
  methods: {
    shownav () {
      this.ishow = !this.ishow
    }
  }
  // mounted () {
  //   http({
  //     url: `/gateway?filmId=${this.$route.params.filmId}&k=579269`,
  //     headers: {
  //       'X-Host': 'mall.film-ticket.film.info'
  //     },
  //     method: 'get'
  //   }).then(res => {
  //     console.log(res.data.data.film)
  //     this.title = res.data.data.film.name
  //   })
  // }
}
</script>
